package com.youlu.myapplication;

import android.os.Bundle;
import android.util.Log;
import android.view.View;

import com.youlu.myapplication.scratch.ScratchFragment;
import com.youlu.myapplication.scratch.ddl;

import androidx.appcompat.app.AppCompatActivity;

public class MainActivity extends AppCompatActivity {

    private static String TAG = "MainActivity";

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        Log.i(TAG, "AT_MOST  " + View.MeasureSpec.AT_MOST);
        Log.i(TAG, "EXACTLY  " + View.MeasureSpec.EXACTLY);
        Log.i(TAG, "UNSPECIFIED  " + View.MeasureSpec.UNSPECIFIED);

        ddl.setApplication(getApplication());

        ScratchFragment fragment = ScratchFragment.createFragment("", true);
//        ScrollerFragment fragment = new ScrollerFragment();
        getSupportFragmentManager().beginTransaction().replace(R.id.fl_container, fragment).commitAllowingStateLoss();
    }
}